package cn.edu.swu.schoolSystem;

public class Student {
    private String id;
    private String name;
    private String gender;
    private int age;

    // 无参构造方法
    public Student() {}
    // 有参构造方法
    public Student(String id, String name, String gender, int age){
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    // id、name、gender、age的封装，公共的getter和setter方法
    public String getId(){
        return id;
    }

    public void setId(String id){
        this.id = id;
    }

    public String getName(){
        return name;
    }

    public void setName(String name){
        this.name = name;
    }

    public String getGender(){
        return gender;
    }

    public void setGender(String gender){
        this.gender = gender;
    }

    public int getAge(){
        return age;
    }

    public void setAge(int age){
        this.age = age;
    }

    // 打印输出该学生的所有信息
    public void showInfo(){
        System.out.println("===========Student Information===========");
        System.out.println("Name:\t" + this.name);
        System.out.println("Id:\t\t" + this.id);
        System.out.println("Gender:\t" + this.gender);
        System.out.println("Age:\t" + this.age);
    }


}
